package com.easylinkin.linkappapi.grid.models.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 网格评比表
 *
 * @author
 * @since 2024-05-16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GridAppraiseDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 填报截止时间
     */
    @NotNull(message = "填报截止时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    /**
     * 指定填报人
     */
    @NotNull(message = "指定填报人不能为空")
    private String fillInUserId;

    @NotEmpty(message = "参与评比单位不能为空")
    private List<String> companyList;
}
